<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  
  <title>PHP扩展功能--cURL | 程序小工  | Just do it!</title>
  <meta name="description" content="遇见更好的自己~" />
  <meta name="keywords" content="" />
  <meta name="HandheldFriendly" content="True" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <link rel="shortcut icon" href="/">
  <link rel="alternate" href="/atom.xml" title="程序小工  | Just do it!">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="cURL表示以命令行的形式请求某个url, 提交数据或获取相应数据。在日常的程序开发中会用到，因此，了解cURL的原理和过程，有助于实际工作和项目中的应用。">
<meta name="keywords" content="curl">
<meta property="og:type" content="article">
<meta property="og:title" content="PHP扩展功能--cURL">
<meta property="og:url" content="http://blog.i2arch.tech/2018/04/16/php-curl/index.html">
<meta property="og:site_name" content="程序小工  | Just do it!">
<meta property="og:description" content="cURL表示以命令行的形式请求某个url, 提交数据或获取相应数据。在日常的程序开发中会用到，因此，了解cURL的原理和过程，有助于实际工作和项目中的应用。">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/phpinfo_curl.png">
<meta property="og:image" content="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/curl_result.png">
<meta property="og:updated_time" content="2018-08-14T07:59:24.559Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="PHP扩展功能--cURL">
<meta name="twitter:description" content="cURL表示以命令行的形式请求某个url, 提交数据或获取相应数据。在日常的程序开发中会用到，因此，了解cURL的原理和过程，有助于实际工作和项目中的应用。">
<meta name="twitter:image" content="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/phpinfo_curl.png">
    
  <link href="https://fonts.googleapis.com/css?family=Inconsolata|Titillium+Web" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
  <link href='//cdn.bootcss.com/node-waves/0.7.5/waves.min.css' rel='stylesheet'>
  <link rel="stylesheet" href="/style.css">
  <script>
    function setLoadingBarProgress(num) {
      document.getElementById('loading-bar').style.width=num+"%";
    }
  </script>
</head>

<body>
  <div id="loading-bar-wrapper">
  <div id="loading-bar"></div>
</div>


  <script>setLoadingBarProgress(20)</script>
  <header class="l_header">
	<div class='wrapper'>
		<div class="nav-main container container--flex">
			<a class="logo flat-box" href='/' >
				程序小工  | Just do it!
			</a>
			<div class='menu'>
				<ul class='h-list'>
					
						<li>
							<a class='flat-box nav-home' href='/'>
								<i class='icon icon-list2'></i>
								首页
							</a>
						</li>
					
						<li>
							<a class='flat-box nav-archives' href='/archives'>
								<i class='icon icon-bookmark'></i>
								归档
							</a>
						</li>
					
						<li>
							<a class='flat-box nav-about' href='/about'>
								<i class='icon icon-user'></i>
								关于
							</a>
						</li>
					
				</ul>
				<div class='underline'></div>
			</div>
			
				<div class="m_search">
					<form name="searchform" class="form u-search-form">
						<input type="text" class="input u-search-input" placeholder="Search" />
						<span class="icon icon-search"></span>
					</form>
				</div>
			
			<ul class='switcher h-list'>
				
					<li class='s-search'><a href='javascript:void(0)'><span class="icon icon-search flat-box"></span></a></li>
				
				<li class='s-menu'><a href='javascript:void(0)'><span class="icon icon-menu flat-box"></span></a></li>
			</ul>
		</div>

		<div class='nav-sub container container--flex'>
			<a class="logo" class="flat-box" href='javascript:void(0)'>
				Word of Forks
			</a>

			<ul class='switcher h-list'>
				<li class='s-comment'><a href='javascript:void(0)'><span class="icon icon-chat_bubble_outline flat-box"></span></a></li>
				<li class='s-top'><a href='javascript:void(0)'><span class="icon icon-arrow_upward flat-box"></span></a></li>
				<li class='s-toc'><a href='javascript:void(0)'><span class="icon icon-format_list_numbered flat-box"></span></a></li>
			</ul>
		</div>
	</div>
</header>
<aside class="menu-phone">
	<nav>
		
			<a href="/" class="nav-home nav">
				首页
			</a>
		
			<a href="/archives" class="nav-archives nav">
				归档
			</a>
		
			<a href="/about" class="nav-about nav">
				关于
			</a>
		
	</nav>
</aside>

    <script>setLoadingBarProgress(40);</script>
  <div class="l_body">
    <div class='container clearfix'>
      <!-- 左侧内容 -->
      <div class='l_main'>
        <article id="post-php-curl"
  class="post white-box article-type-post"
  itemscope itemprop="blogPost">
	<section class='meta'>

	<h2 class="title">
  	<a href="/2018/04/16/php-curl/">
    	PHP扩展功能--cURL
    </a>
	</h2>

	<div class="pagenav">
		<time>
			2018-04-16
		</time>

		
    
    <div class='cats'>
        <i class="icon icon-bookmark"></i>
        <a href="/categories/PHP/">PHP</a>
    </div>


		
			<div class="pagetags">
				<i class="icon icon-price-tag" style="margin-right: 2px;"></i>
				
					<a href="/tags/curl/" style="margin-left: 3px;">
						curl
					</a>
				
			</div>
			
	</div>
	</section>

	
	<section class="toc-wrapper"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#一-入门三部曲"><span class="toc-text"> 一、入门三部曲</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-curl-是什么"><span class="toc-text"> 1、cURL 是什么？</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-为什么要用-curl"><span class="toc-text"> 2、为什么要用 cURL?</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-在-php-中怎么用-curl"><span class="toc-text"> 3、在 PHP 中怎么用 cURL?</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#二-curl-在-php-中的应用"><span class="toc-text"> 二、cURL 在 PHP 中的应用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#必备函数"><span class="toc-text"> 必备函数：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-模拟-get-请求"><span class="toc-text"> 1、模拟 get 请求</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-模拟-post-请求"><span class="toc-text"> 2、模拟 post 请求</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-封装成类兼容-post-和-get-方式"><span class="toc-text"> 3、封装成类，兼容 post 和 get 方式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-实例化进行数据获取"><span class="toc-text"> 4、实例化进行数据获取</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-查看匹配结果"><span class="toc-text"> 5、查看匹配结果</span></a></li></ol></li></ol></section>
	

	<section class="article typo">
		<div class="article-entry" itemprop="articleBody">
				<span class="zhaiyao">[摘要]</span>
			<p>cURL表示以命令行的形式请求某个url, 提交数据或获取相应数据。在日常的程序开发中会用到，因此，了解cURL的原理和过程，有助于实际工作和项目中的应用。</p>
<a id="more"></a>
<h2 id="一-入门三部曲"><a class="markdownIt-Anchor" href="#一-入门三部曲"></a> 一、入门三部曲</h2>
<h3 id="1-curl-是什么"><a class="markdownIt-Anchor" href="#1-curl-是什么"></a> 1、cURL 是什么？</h3>
<p><a href="https://zh.wikipedia.org/wiki/CURL" target="_blank" rel="noopener">wikipedia 介绍</a>：</p>
<pre><code>* cURL是一个利用URL语法在命令行下工作的文件传输工具，1997年首次发行。它支持文件上传和下载，所以是综合传输工具，但按传统，习惯称cURL为下载工具。cURL还包含了用于程序开发的libcurl。
* cURL支持的通信协议有FTP、FTPS、HTTP、HTTPS、TFTP、SFTP、Gopher、SCP、Telnet、DICT、FILE、LDAP、LDAPS、IMAP、POP3、SMTP和RTSP。
* libcurl支持的平台有Solaris、NetBSD、FreeBSD、OpenBSD、Darwin、HP-UX、IRIX、AIX、Tru64、Linux、UnixWare、HURD、Windows、Symbian、Amiga、OS/2、BeOS、Mac OS X、Ultrix、QNX、BlackBerry Tablet OS、OpenVMS、RISC OS、Novell NetWare、DOS等。
</code></pre>
<p>简而言之：cURL 是下载工具、传输工具。利用 url 的语法规则传输文件、数据的命令行工具和库。</p>
<!--more-->
<h3 id="2-为什么要用-curl"><a class="markdownIt-Anchor" href="#2-为什么要用-curl"></a> 2、为什么要用 cURL?</h3>
<p>通常是通过表单（html）提交数据到 php 文件从而实现数据的交互，但是不能实现<strong>php 文件之间</strong>的数据和文件传输，所以，cURL 的应用场景主要是 php 文件之间的数据和文件传输。</p>
<h3 id="3-在-php-中怎么用-curl"><a class="markdownIt-Anchor" href="#3-在-php-中怎么用-curl"></a> 3、在 PHP 中怎么用 cURL?</h3>
<p>（1）php.ini 中开启 curl 扩展</p>
<figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">extension</span>=php_curl.dll</span><br></pre></td></tr></table></figure>
<p>然后重启 apache</p>
<p>（2）在 phpinfo()的输出信息中查看是否有 curl 的相关信息<br>
<a href="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/phpinfo_curl.png" target="_blank" rel="noopener"><img src="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/phpinfo_curl.png" alt="avatar"></a></p>
<p>【注】：如果开启无效，可以尝试将 php 安装目录下的 libeay32.dll 、ssleay32.dll 拷贝到 windows 或 windows/system32 目录下</p>
<h2 id="二-curl-在-php-中的应用"><a class="markdownIt-Anchor" href="#二-curl-在-php-中的应用"></a> 二、cURL 在 PHP 中的应用</h2>
<h3 id="必备函数"><a class="markdownIt-Anchor" href="#必备函数"></a> 必备函数：</h3>
<p>(1)curl_init() — 初始化 cURL 会话</p>
<p>(2)curl_setopt() — 设置 cURL 传输选项</p>
<p>参数：</p>
<ul>
<li>
<p>post 方式：</p>
<ul>
<li>CURLOPT_POST</li>
<li>CURLOPT_POSTFIELDS</li>
</ul>
</li>
<li>
<p>get 方式：</p>
<ul>
<li>CURLOPT_RETURNTRANSFER</li>
<li>CURLOPT_SSL_VERIFYHOST</li>
</ul>
</li>
<li>
<p>安全验证：</p>
<ul>
<li>CURLOPT_SSL_VERIFYPEER</li>
<li>CURLOPT_SSL_VERIFYPEER</li>
</ul>
</li>
</ul>
<p>(3)curl_exec(); — 执行 cURL 会话</p>
<p>(4)curl_close() — 关闭 cURL 会话</p>
<h3 id="1-模拟-get-请求"><a class="markdownIt-Anchor" href="#1-模拟-get-请求"></a> 1、模拟 get 请求</h3>
<p>（1）默认是直接显示返回的数据，对于 html 数据，则直接以网页的形式显示。</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//1、初始化curl</span></span><br><span class="line">$curl = curl_init();</span><br><span class="line"></span><br><span class="line"><span class="comment">//2、告诉curl,请求的地址</span></span><br><span class="line">curl_setopt($curl, CURLOPT_URL, <span class="string">'http://www.baidu.com/index.php'</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">//3、发送请求</span></span><br><span class="line">curl_exec($curl);</span><br><span class="line"></span><br><span class="line"><span class="comment">//4、关闭资源</span></span><br><span class="line">curl_close($curl);</span><br></pre></td></tr></table></figure>
<p>（2）设置只获取数据，不直接显示</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//1、初始化curl</span></span><br><span class="line">$curl = curl_init();</span><br><span class="line"></span><br><span class="line"><span class="comment">//2、告诉curl,请求的地址</span></span><br><span class="line">curl_setopt($curl, CURLOPT_URL, <span class="string">'http://www.baidu.com/index.php'</span>);</span><br><span class="line"><span class="comment">//将请求的数据返回，而不是直接输出</span></span><br><span class="line">curl_setopt($curl, CURLOPT_RETURNTRANSFER, <span class="keyword">true</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">//3、发送请求</span></span><br><span class="line">$res = curl_exec($curl);</span><br><span class="line">var_dump($res);</span><br><span class="line"></span><br><span class="line"><span class="comment">//4、关闭资源</span></span><br><span class="line">curl_close($curl);</span><br></pre></td></tr></table></figure>
<h3 id="2-模拟-post-请求"><a class="markdownIt-Anchor" href="#2-模拟-post-请求"></a> 2、模拟 post 请求</h3>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1</span>、初始化curl</span><br><span class="line">$curl = curl_init();</span><br><span class="line"></span><br><span class="line"><span class="comment">//2、设置请求的地址</span></span><br><span class="line">curl_setopt($curl, CURLOPT_URL, <span class="string">'http://localhost/curl_post.php'</span>);</span><br><span class="line"><span class="comment">// （1）设置请求的方式为post</span></span><br><span class="line">curl_setopt($curl, CURLOPT_POST, <span class="keyword">true</span>);</span><br><span class="line"><span class="comment">// （2）设置post提交的数据</span></span><br><span class="line">$data = [</span><br><span class="line">    <span class="string">'username'</span> =&gt; <span class="string">'zqunor'</span>,</span><br><span class="line">    <span class="string">'password'</span> =&gt; <span class="string">'zqunor123'</span></span><br><span class="line">];</span><br><span class="line"><span class="comment">// （3）提交数据</span></span><br><span class="line">curl_setopt($curl, CURLOPT_POSTFIELDS, $data);</span><br><span class="line"></span><br><span class="line"><span class="comment">//3、发送请求</span></span><br><span class="line">curl_exec($curl);</span><br><span class="line"></span><br><span class="line"><span class="comment">//4、关闭资源</span></span><br><span class="line">curl_close($curl);</span><br></pre></td></tr></table></figure>
<h3 id="3-封装成类兼容-post-和-get-方式"><a class="markdownIt-Anchor" href="#3-封装成类兼容-post-和-get-方式"></a> 3、封装成类，兼容 post 和 get 方式</h3>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">HttpRequest</span></span></span><br><span class="line"><span class="class"></span>&#123;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">static</span> $isShow = <span class="keyword">false</span>;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">public</span> <span class="function"><span class="keyword">function</span> <span class="title">__set</span><span class="params">($attr, $value)</span></span></span><br><span class="line"><span class="function">    </span>&#123;</span><br><span class="line">        <span class="keyword">$this</span>-&gt;$attr = $value;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">public</span> <span class="keyword">static</span> <span class="function"><span class="keyword">function</span> <span class="title">send</span><span class="params">($url,$data=null)</span></span></span><br><span class="line"><span class="function">    </span>&#123;</span><br><span class="line">        $curl = curl_init();</span><br><span class="line">        <span class="comment">// 设置请求的url地址</span></span><br><span class="line">        curl_setopt($curl, CURLOPT_URL, $url);</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 直接跳过安全证书的验证</span></span><br><span class="line">        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, <span class="keyword">false</span>);</span><br><span class="line">        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, <span class="keyword">false</span>);</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 根据$data判断是post还是get方式</span></span><br><span class="line">        <span class="keyword">if</span> (!<span class="keyword">empty</span>($data)) &#123;</span><br><span class="line">            <span class="comment">// 如果$data非空，则为post方式</span></span><br><span class="line">            curl_setopt($curl, CURLOPT_POST, <span class="keyword">true</span>);</span><br><span class="line">            curl_setopt($curl, CURLOPT_POSTFIELDS, $data);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="comment">// 反之为get方式</span></span><br><span class="line">        <span class="keyword">if</span> (!<span class="keyword">self</span>::$isShow) &#123;</span><br><span class="line">            <span class="comment">// 不直接显示数据，而是以返回值的形式</span></span><br><span class="line">            curl_setopt($curl, CURLOPT_RETURNTRANSFER, $url);</span><br><span class="line">        &#125;</span><br><span class="line">        $res = curl_exec($curl);</span><br><span class="line">        <span class="keyword">return</span> $res;</span><br><span class="line"></span><br><span class="line">        curl_close($curl);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="4-实例化进行数据获取"><a class="markdownIt-Anchor" href="#4-实例化进行数据获取"></a> 4、实例化进行数据获取</h3>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 调用封装的类，请求知乎php话题下的数据</span></span><br><span class="line">$res = HttpRequest::send(<span class="string">'https://www.zhihu.com/search?type=content&amp;q=php'</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">// 查看需要获取的数据的html样式</span></span><br><span class="line"><span class="comment">// &lt;a target="_blank" href="/question/26498147/answer/33029411" data-reactid="218"&gt;&lt;span class="Highlight" data-reactid="219"&gt;「&lt;em&gt;PHP&lt;/em&gt; 是最好的语言」这个梗是怎么来的？&lt;/span&gt;&lt;/a&gt;</span></span><br><span class="line"><span class="comment">// &lt;a target="_blank" href="/question/41913568/answer/95778872" data-reactid="366"&gt;&lt;span class="Highlight" data-reactid="367"&gt;如何看待天猫彻底抛弃&lt;em&gt;PHP&lt;/em&gt;？&lt;/span&gt;&lt;/a&gt;</span></span><br><span class="line"><span class="comment">// &lt;a target="_blank" href="/question/25038841/answer/44396770" data-reactid="292"&gt;&lt;span class="Highlight" data-reactid="293"&gt;&lt;em&gt;PHP&lt;/em&gt;、Java、Python、C、C++ 这几种编程语言都各有什么特点或优点？&lt;/span&gt;&lt;/a&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 根据样式设置正则匹配模式，筛选所需数据</span></span><br><span class="line">$reg = <span class="string">'/&lt;a[^&gt;]*&gt;&lt;span class="Highlight"[^&gt;]*&gt;(.+?)&lt;\/span&gt;&lt;\/a&gt;/'</span>;</span><br><span class="line"></span><br><span class="line">preg_match_all($reg, $res, $match);</span><br><span class="line"></span><br><span class="line">var_dump($match);</span><br></pre></td></tr></table></figure>
<h3 id="5-查看匹配结果"><a class="markdownIt-Anchor" href="#5-查看匹配结果"></a> 5、查看匹配结果</h3>
<p><a href="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/curl_result.png" target="_blank" rel="noopener"><img src="https://raw.githubusercontent.com/zqunor/MarkdownPic/master/curl_result.png" alt="avatar"></a></p>
<p>完成！</p>

		</div>

		
			<div class="art-item-footer">
					
						<span class="art-item-left"><i class="icon icon-chevron-thin-left"></i> <a href="/2018/04/16/php-email/" rel="prev" title="PHP扩展功能--发送邮件">
							PHP扩展功能--发送邮件
						</a>上一篇文章</span>
					
					
			</div>
		

		
			

    <div class="recommended_posts">
        <h3>推荐文章</h3>
        <ul>
            
                <li><a href="http://blog.i2arch.tech/2018/04/26/composer-image/">Composer设置国内镜像</a></li>
            
                <li><a href="http://blog.i2arch.tech/2018/04/16/tool-git-remote-add/">Git项目管理--将现有项目提交到空仓库</a></li>
            
                <li><a href="http://blog.i2arch.tech/2018/04/16/tool-git/">使用Git和Github进行代码管理</a></li>
            
                <li><a href="http://blog.i2arch.tech/2018/04/16/php-email/">PHP扩展功能--发送邮件</a></li>
            
        </ul>
    </div>


		
	</section>

	

</article>
<script>
	window.subData = {
		title: 'PHP扩展功能--cURL',
		tools: true
	}
</script>

      </div>

      <!-- 右侧边栏组件 -->
      <aside class='l_side'>
        
      </aside>

      <div class="gotop">
          
    <a href='javascript:void(0)'>
        <i class="icon icon-arrow_upward flat-box">
        </i>
    </a>

      </div>
      <script>setLoadingBarProgress(60);</script>
    </div>
  </div>
  <footer id="footer" class="clearfix">

	<div class="social-wrapper">
  	
      
        <a href="https://github.com/zqunor" class="social github"
          target="_blank" rel="external">
          <span class="icon icon-github"></span>
        </a>
      
        <a href="https://www.cnblogs.com/zqunor" class="social zhihu"
          target="_blank" rel="external">
          <span class="icon icon-zhihu"></span>
        </a>
      
        <a href="/atom.xml" class="social rss"
          target="_blank" rel="external">
          <span class="icon icon-rss"></span>
        </a>
      
    
  </div>
  <div>Theme <a href='https://github.com/stkevintan/hexo-theme-material-flow' class="codename">MaterialFlow</a>  Powered by<a href="https://blog.i2arch.tech/" target="_blank">程序小工</a>.</div>

</footer>

  <script>setLoadingBarProgress(80);</script>
  

    <script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src='//cdn.bootcss.com/node-waves/0.7.5/waves.min.js'></script>
    <script src="//cdn.bootcss.com/scrollReveal.js/3.3.2/scrollreveal.min.js"></script>
    <script src="/js/jquery.fitvids.js"></script>
      <script>
        var GOOGLE_CUSTOM_SEARCH_API_KEY = "";
        var GOOGLE_CUSTOM_SEARCH_ENGINE_ID = "";
        var ALGOLIA_API_KEY = "";
        var ALGOLIA_APP_ID = "";
        var ALGOLIA_INDEX_NAME = "";
        var AZURE_SERVICE_NAME = "";
        var AZURE_INDEX_NAME = "";
        var AZURE_QUERY_KEY = "";
        var BAIDU_API_ID = "fca5b83cf69f752ddc96a61ef64a3659";
        var SEARCH_SERVICE = "hexo";
        var ROOT = "/" || "/";
        if (!ROOT.endsWith('/')) ROOT += '/';
      </script>
      <script src="/js/search.js"></script>
        <script src="/js/app.js"></script>
  <script>setLoadingBarProgress(100);</script>
</body>
</html>
